package com.ftg.mall.controller.pms;

import com.ftg.mall.base.entity.pms.ProductFullReduction;
import com.ftg.mall.base.util.bussiness.AbstractController;
import com.ftg.mall.base.util.tooltips.ResBean;
import com.ftg.mall.service.impl.pms.ProductFullReductionServiceImpl;
import com.ftg.mall.service.pms.IProductFullReductionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 产品满减表(只针对同商品) 前端控制器
 * </p>
 *
 * @author wangty
 * @since 2022-11-15
 */
@RestController
@RequestMapping("/pms/productFullReduction")
@Api(tags = "产品满减表")
public class ProductFullReductionController extends AbstractController<ProductFullReductionServiceImpl, ProductFullReduction> {

    @Resource
    IProductFullReductionService iProductFullReductionService;

    /**
     * 进行联表分页
     * @return
     */
    @GetMapping("/productPage")
    @ApiOperation("产品满减表商品分页")
    public List<Map<String, Object>> productPage(
            @RequestParam("page")@ApiParam("页数") Integer page,
            @RequestParam("limits")@ApiParam("条数") Integer limits){
        return iProductFullReductionService.productPage(page,limits);
    }

}
